package Views;

import Source.DisplayEditAirport;
import UCM.UCDisplayEditAirport;
import java.awt.FlowLayout;
import javax.swing.JButton;
import javax.swing.JPanel;

/**
 *
 * @author Joshua King
 */
public class ViewDisplayEditAirport extends JPanel {
    protected JButton editAirportButton = new JButton("Edit Airport");
    private final UCDisplayEditAirport UCDisplayEditAirport = new UCDisplayEditAirport(this);
    private DisplayEditAirport model;

    public ViewDisplayEditAirport() {
        setLayout(new FlowLayout());
        add(editAirportButton);
        editAirportButton.addActionListener(new AdapterUCCToAL(UCDisplayEditAirport));
    }

    public void loadTo(DisplayEditAirport model) {
        this.model = model;
    }

    public void setEditAirportVisible() {
        ViewMain.getInstance().updateEditAirport(model.getAirportData());
    }
}
